//
//  PYWaterFallFlowLayout.h
//  WaterFallStream
//
//  Created by zpy on 15/12/5.
//  Copyright © 2015年 zpy. All rights reserved.
//

#import <UIKit/UIKit.h>
@class PYWaterFallFlowLayout;
@protocol PYWaterFallFlowLayoutDelegate <NSObject>

@required
/**
 *  返回indexpath对应的行高
 */
-(CGFloat)waterFlowLayout:(PYWaterFallFlowLayout *)layout heightForItemAtIndexpath:(NSIndexPath *)indexPath withItemWidth:(CGFloat)width;
@optional
/**
 *  返回布局额行间距
 */
-(CGFloat)rowSpacingInWaterFallFlowLayout:(PYWaterFallFlowLayout *)layout;
/**
 *  返回布局列间距
 */
-(CGFloat)columnSpacingInWaterFallFlowLayout:(PYWaterFallFlowLayout *)layout;
/**
 *  返回布局边距
 */
-(UIEdgeInsets)edgeInsetsInWaterFallFlowLayout:(PYWaterFallFlowLayout *)layout;
/**
 *  返回布局的列数
 */
-(NSUInteger)columnCountInWaterFallFlowLayout:(PYWaterFallFlowLayout *)layout;
@end

@interface PYWaterFallFlowLayout : UICollectionViewLayout

@property(nonatomic,weak) id <PYWaterFallFlowLayoutDelegate> delegate;
@end
